home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / intrfc61.arc / INTRFC.DOC < prev    next >
Text File  |  1991-03-28  |  5KB  |  116 lines

  1. INTRFC - Program to dump TPU files. (Dec, 1990)
  2.  
  3. Version 1.31:  Dumps TP 6.0 format files.
  4.  
  5. Written for the public domain by D.J. Murdoch (CIS 71631,122 or
  6. Fidonet 1:221/177.40)
  7.  
  8. INTRODUCTION
  9.  
  10.      I started INTRFC because I got a library of Turbo Pascal 4.0
  11. subroutines which had some errors in the documentation.  One of
  12. the functions wanted its arguments to be a special type, but the
  13. doc's didn't tell me which one.  TP gave me an error message
  14. saying I wasn't using the right type, but wouldn't tell me which
  15. one to use either.  I decided to decode the TPU file and figure
  16. out what TP wanted.  Once I got started, it was hard to stop.
  17. So, I ended up writing INTRFC, which printed out almost all the
  18. information you'll ever need about the interface to a TPU unit.
  19.  
  20.      I decided to upgrade INTRFC to TP 5.5 files last year, and
  21. got carried away again.  Version 1.2 dumped the complete file, not just
  22. the interface section.
  23.  
  24.      The recent release of TP 6.0 made it necessary to upgrade again.
  25. This one was easy:  there aren't very many differences between version
  26. 5.5 and 6.0 .TPU files.  I decided to fill in the couple of gaps in
  27. version 1.2, and the current one dumps everything in the file.
  28. However, I made a few mistakes in release 1.3; this version 1.31 fixes
  29. those.
  30.  
  31.      Because of the way INTRFC has been written, i.e. entirely by
  32. guesswork, there are probably numerous special cases that it doesn't
  33. handle properly.  That's one reason the source code is there - so
  34. other people can fix up my mistakes.  (And if you do, please tell me -
  35. that's how I found the bugs that version 1.31 fixes.)
  36.  
  37.      The other reason I included source code is because it will
  38. serve as a bit of documentation for the TPU file format:  Borland
  39. will never publish it.  They want to be free to change the format,
  40. making INTRFC obsolete whenever a new TP arrives.  Others who want to
  41. do completely different things to a TPU file may benefit from reading
  42. it.  (The other difficulty with a program written the way this one was
  43. is that comments are almost non-existent.  If you have any short
  44. questions about it that you can't figure out, send them to me at one
  45. of the addresses above.)
  46.  
  47. USAGE:
  48.         INTRFC /options unit
  49.    where options are letters from the following:
  50.       B - emitted code Bytes
  51.       C - initialized Constant blocks
  52.       D - coDe blocks
  53.       E - routine Entry records
  54.       G - emitted Global const bytes
  55.       H - TPU Header
  56.       I - Implementation section (if $D was used in compilation)
  57.       L - proc/fn Locals (if $L was used in compilation)
  58.       M - source line number map (NEW!)
  59.       N - Names in interface
  60.       O - Object VMT records
  61.       R - Relocation records
  62.       S - source file records (NEW!)
  63.       V - Var blocks
  64.       X - mystery section (default on - NEW!)
  65.       A - turn All options on
  66.       Tpath - set the Turbo directory, where the TURBO.TPL and referenced
  67.               units are kept
  68.  
  69.    Options are processed sequentially and toggle the display.
  70.    E.G. To see all but the relocation records in the system unit, use
  71.       INTRFC /AR /T\turbo SYSTEM
  72.    The default is just the names in the interface section.
  73.  
  74. LIMITATIONS
  75.  
  76.     There are tons of limitations to INTRFC.  It doesn't know how
  77. to print any but the simplest types of constants.  It won't print
  78. the values of typed constants. Etc. Etc. Etc.  If you want it to
  79. do something differently just go ahead and change it!  I
  80. recommend compiling with all possible checks turned on, since
  81. it's pretty easy to get lost in all those pointers.
  82.  
  83. FILES
  84.  
  85. The following files should be included in this package.
  86.  
  87. INTRFC   DOC     4948  27-03-91  11:15p  This file
  88. TPU60    DOC     3793  19-12-90   8:27p  TPU structure outline
  89. INTRFC   EXE    50160  27-03-91  11:09p  The executable
  90.  
  91. INTRFC   PAS     3567  27-03-91  10:56p  Main program
  92. GLOBALS  PAS     1026  19-12-90   7:52p  Program globals
  93.  
  94. HEAD     PAS     2752  19-12-90   7:53p  TPU header dumper
  95. NAMELIST PAS    19415  18-12-90  10:51p  Prints interface section
  96. NAMETYPE PAS     2876  12-03-91   8:56p  Type definitions for NAMELIST
  97. BLOCKS   PAS     5437  19-12-90   8:23p  Routines for code blocks, etc.
  98. SRCFILES PAS     3758  18-12-90  10:54p  Prints source files & line numbers
  99. RELOC    PAS     3638  25-02-90  10:31a  Prints relocation records
  100. CODE     PAS     1313  25-02-90   8:09p  Code and const dumper
  101.  
  102. DUMP     PAS     2370  19-12-90   7:54p  Various dump routines
  103. LOADER   PAS     5439  27-03-91  11:08p  Reads in .TPU and .TPL files
  104. UTIL     PAS     6620  15-12-90  10:05a  Various utility routines
  105. TEST1    PAS     1316  12-03-91   8:39p  Test file
  106. TEST1    INC      104  18-12-90   9:41p  Test include file
  107. PARAMS   PAS     3192  11-03-91   6:30p  Parses parameters
  108.  
  109. THAT'S IT!
  110.  
  111.      Have fun with INTRFC and Turbo Pascal.  I'd like to hear of
  112. any novel uses.
  113.  
  114. D.J. Murdoch
  115.  
  116.